import {request} from '@/network/request'

export function getDetail(config) {
  return request({
    url: 'detail',
    params: {
      iid: config
    }
  })
}

export function getRecommend() {
  return request({
    url: 'recommend'
  })
}

//将所有需要的数据放在一个类里，方便调用
export class goods{
  constructor(itemInfo,columns,services) {
    this.title = itemInfo.title;
    this.desc = itemInfo.desc;
    this.oldPrice = itemInfo.oldPrice;
    this.price = itemInfo.lowNowPrice;
    this.discountDesc = itemInfo.discountDesc;
    this.discountBgColor = itemInfo.discountBgColor;
    this.sell = columns[0];
    this.fans = columns[1];
    this.services = services;
  }
}